// Thud - a dynamic object-oriented language
// Copyright (C) 2009,2010 David H. Hovemeyer <david.hovemeyer@gmail.com>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// Types of Abstract Syntax Tree Nodes

#ifndef FE_ASTNODETYPE_H
#define FE_ASTNODETYPE_H

/** Types of ASTNodes. */
enum ASTNodeType {
	/** Overall translation unit. */
	AST_UNIT,
	/** List of imports. */
	AST_IMPORT_LIST,
	/** An import. */
	AST_IMPORT,
	/** A static import (of a method from a module). */
	AST_STATIC_IMPORT,
	/** A list of statements. */
	AST_STATEMENT_LIST,
	/** A statement. */
	AST_STATEMENT,
	/** A while statement. */
	AST_WHILE_STATEMENT,
	/** An if statement. */
	AST_IF_STATEMENT,
	/** A return statement. */
	AST_RETURN_STATEMENT,
	/** An expression involving a binary operator. */
	AST_BINARY_OP_EXPR,
	/** An expression involving a unary operator. */
	AST_UNARY_OP_EXPRESSION,
	/** A field reference expression. */
	AST_FIELD_REF_EXPR,
	/** A method call expression. */
	AST_METHOD_CALL_EXPR,
	/** A call to a module method imported using a static import. */
	AST_MODULE_METHOD_CALL_EXPR,
	/** A variable reference expression. */
	AST_VAR_REF_EXPR,
	/** An integer literal expression. */
	AST_INT_LITERAL_EXPR,
	/** A boolean literal expression. */
	AST_BOOLEAN_LITERAL_EXPR,
	/** A symbol literal expression. */
	AST_SYMBOL_LITERAL_EXPR,
	/** A string literal expression. */
	AST_STRING_LITERAL_EXPR,
	/** A self reference expression (i.e., reference to the receiver object). */
	AST_SELF_REF_EXPR,
	/** A new expression (creation of object). */
	AST_NEW_EXPR,
	/** A nil expression (reference to the special "nil" object). */
	AST_NIL_EXPR,
	/** A class. */
	AST_CLASS,
	/** A module (singleton class). */
	AST_MODULE,
	/** List of class members. */
	AST_MEMBER_LIST,
	/** A method definition. */
	AST_METHOD,
	/** A magic (native) method declaration. */
	AST_MAGIC_METHOD,
	/** A field declaration. */
	AST_FIELD,
	/** A list of variable declarations. */
	AST_VAR_LIST,
	/** A single variable declaration. */
	AST_VAR,
	/** List of method call argument expressions. */
	AST_ARG_LIST,
};

#endif 
